﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Layout/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MusicWorks.Web.Default" %>
<%@ Register Src="~/Controls/CategoryListControl.ascx" TagName="CategoryList" TagPrefix="uc" %>
<%@ Register Src="~/Controls/CategoryProductListControl.ascx" TagName="CategoryProductList" TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<script type="text/javascript">
    function call_service() {
        tempuri.org.ICatalogService.GetProductsByCategory("Adventure Works Catalog","Boots",function() {
        alert('it worked');},function() { alert('it failed'); });
    }
    </script>    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="menu" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
    <Scripts>
        <asp:ScriptReference Path="http://localhost:63971/CatalogService.svc/test/js" />
    </Scripts>
</asp:ScriptManager>
    <uc:CategoryList runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="pageBody" runat="server">    
    <uc:CategoryProductList runat="server" />
    <input type="button" value="test" onclick="call_service();" />
</asp:Content>
